package cn.life.common.utils;

import java.io.Serializable;

/**
 * 密码加密
 * @author 刘明星
 * 
 */
public class EncryptPwdUtil implements Serializable{

	/**
	 * 加密
	 */
	public static String encryptPwd(String password){
		String pwd = null;
		try {
				pwd =CDesUtilsHelper.getUtilsForDes("l_l > O_O > Q_Q").encrypt(password);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return pwd;
	}

	/**
	 * 解密
	 */
	public static String decryptPwd(String password) {
		String pwd = null;
		try {
			pwd =CDesUtilsHelper.getUtilsForDes("l_l > O_O > Q_Q").decrypt(password);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return pwd;
	}
	
	public static void main(String[] args) {
		String pwd = "e23169a8d99c6ec6";
		System.out.println(pwd);
		String enpwd = encryptPwd(pwd);
		System.out.println(enpwd);
		String depwd = decryptPwd(enpwd);
		System.out.println(depwd);
		String depwd1 = decryptPwd(pwd);
		System.out.println(depwd1);
		
	}
	
}
